package com.d3works.apps.contract.batch;

import com.d3works.apps.base.db.Batch;
import com.d3works.apps.base.service.app.AppBaseService;
import com.d3works.apps.contract.db.Contract;
import com.d3works.apps.contract.db.repo.ContractRepository;
import com.d3works.apps.contract.service.ContractService;
import com.d3works.db.Query;
import com.d3works.exception.D3worksException;
import com.google.inject.Inject;

abstract class BatchContractFactory {
  ContractRepository repository;
  ContractService service;
  AppBaseService baseService;

  @Inject
  public BatchContractFactory(
      ContractRepository repository, ContractService service, AppBaseService baseService) {
    this.repository = repository;
    this.service = service;
    this.baseService = baseService;
  }

  abstract Query<Contract> prepare(Batch batch);

  abstract void process(Contract contract) throws D3worksException;
}
